package com.drakulo.hi.gfx;

import org.newdawn.slick.Image;
import org.newdawn.slick.SlickException;
import org.newdawn.slick.SpriteSheet;

public class ImageFactory {
	public static final int FACE_SIZE = 96;

	public static Image createFace(String p_file, int p_x, int p_y) throws SlickException {
		return createFromSpriteSheet(p_file, FACE_SIZE, FACE_SIZE, p_x, p_y);
	}

	public static Image createFromSpriteSheet(String p_file, int p_spriteWidth, int p_spriteHeight,
			int p_x, int p_y) throws SlickException {
		SpriteSheet sp = new SpriteSheet(p_file, p_spriteWidth, p_spriteHeight);
		return sp.getSprite(p_x, p_y);
	}
}
